CREATE TABLE [dbo].[TMLETR_CL02]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_LETR_CLIE] [dbo].[TD_VC_020] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[CO_TIPO_OPER] [dbo].[TD_VC_003] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NULL,
[CO_AGEN] [dbo].[TD_VC_003] NULL,
[CO_CLIE] [dbo].[TD_VC_020] NOT NULL,
[FE_EMIS] [dbo].[TD_DT_001] NOT NULL,
[FE_VENC] [dbo].[TD_DT_001] NOT NULL,
[FE_PROG_COBR] [dbo].[TD_DT_001] NULL,
[FA_TIPO_CAMB] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TMLETR_CL__FA_TI__05AEC38C] DEFAULT ((1.000)),
[CO_MONE] [dbo].[TD_VC_003] NOT NULL,
[IM_TOTA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMLETR_CL__IM_TO__06A2E7C5] DEFAULT ((0)),
[IM_PAGA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TMLETR_CL__IM_PA__07970BFE] DEFAULT ((0)),
[IM_APLI] [dbo].[TD_NU_015_006] NOT NULL CONSTRAINT [DF__TMLETR_CL__IM_AP__088B3037] DEFAULT ((0)),
[ST_LETR_ADEL] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TMLETR_CL__ST_LE__097F5470] DEFAULT ('N'),
[NO_ENDO] [dbo].[TD_VC_050] NULL,
[FE_PROT] [dbo].[TD_DT_001] NULL,
[NU_RENO] [dbo].[TD_VC_008] NULL,
[NU_CANJ] [dbo].[TD_VC_008] NULL,
[CO_ESTA_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NO_AVAL] [dbo].[TD_VC_100] NULL,
[NO_DIRE_AVAL] [dbo].[TD_VC_100] NULL,
[NU_RUCC_AVAL] [dbo].[TD_VC_020] NULL,
[NU_TELE_AVAL] [dbo].[TD_VC_020] NULL,
[DE_LUGA_GIRO] [dbo].[TD_VC_020] NULL,
[TI_CLIE] [dbo].[TD_VC_003] NULL,
[CO_VEND] [dbo].[TD_VC_020] NULL,
[TI_FACT] [dbo].[TD_VC_003] NULL,
[CO_LIQU] [dbo].[TD_VC_020] NULL,
[NU_UNIC_BANC] [dbo].[TD_VC_020] NULL,
[NU_DIET] [dbo].[TD_VC_020] NULL,
[DE_GLOS] [dbo].[TD_VC_100] NULL,
[DE_OBSE] [dbo].[TD_VC_100] NULL,
[NU_ASTO] [dbo].[TD_VC_010] NULL,
[ST_CONT] [dbo].[TD_VC_001_INTE] NULL CONSTRAINT [DF__TMLETR_CL__ST_CO__0B679CE2] DEFAULT ('N'),
[NU_PROC] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TMLETR_CL__NU_PR__0D4FE554] DEFAULT ((0)),
[NU_REFE] [dbo].[TD_VC_020] NULL,
[IM_SALD] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TMLETR_CL__IM_SA__0E44098D] DEFAULT ((0)),
[IM_AMRT] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TMLETR_CL__IM_AM__0F382DC6] DEFAULT ((0)),
[IM_INTR] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TMLETR_CL__IM_IN__102C51FF] DEFAULT ((0)),
[IM_VALO_CUOT] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TMLETR_CL__IM_VA__11207638] DEFAULT ((0)),
[NU_AMAR] [dbo].[TD_VC_008] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMLETR_CL__CO_US__12149A71] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMLETR_CL__FE_US__1308BEAA] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TMLETR_CL__CO_US__13FCE2E3] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TMLETR_CL__FE_US__14F1071C] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMLETR_CL02] WITH NOCHECK ADD CONSTRAINT [CK__TMLETR_CL__ST_CO__0C5BC11B] CHECK NOT FOR REPLICATION (([ST_CONT]='P' OR [ST_CONT]='N'))
GO
ALTER TABLE [dbo].[TMLETR_CL02] WITH NOCHECK ADD CONSTRAINT [CK__TMLETR_CL__ST_LE__0A7378A9] CHECK NOT FOR REPLICATION (([ST_LETR_ADEL]='N' OR [ST_LETR_ADEL]='S'))
GO
ALTER TABLE [dbo].[TMLETR_CL02] ADD CONSTRAINT [PK__TMLETR_C__14412DCE528F1239] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_LETR_CLIE]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMLETR_CL02] ADD CONSTRAINT [FK__TMLETR_CL__CO_EM__0169FCB3] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
